package com.ruoyi.flow.common.tools.mediaconverter.converter.converter;


import com.ruoyi.flow.common.tools.mediaconverter.converter.ffmpeg.FfmpegInvoker;
import com.ruoyi.flow.common.tools.mediaconverter.converter.ffmpeg.FfmpegLocator;

import static com.google.common.base.Preconditions.checkNotNull;
/**
 * Created by Administrator on 2017/7/13.
 */
@Converter(srcFormat="amr",destFormat="mp3")
public class Amr2Mp3Converter extends IConverter {
    public Amr2Mp3Converter(String srcFilePath, String destFilePath) {
        super(srcFilePath, destFilePath);
    }

    @Override
    public FfmpegInvoker createInvoker(FfmpegLocator locator) {
    	checkNotNull(locator);
        return locator.createInvoker().addArg("-i").addArg(srcFilePath).addArg("-acodec").addArg("libmp3lame").addArg(destFilePath);
    }
}
